<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>customer form</title>
</head>
<body>

<form th:action="@{/userAccount/confirmPurchase}" method="post">
    <table cellpadding="10" cellspacing="0" border="1">
        <tr>
            <th colspan="3" style="text-align: center">填写用户姓名</th>
        </tr>
        <tr>
            <td>姓名:</td>
            <td colspan="2"><input type="text" name="customerName"></td>
        </tr>
        <tr>
            <th colspan="3" style="text-align: center">图书列表</th>
        </tr>
        <tr>
            <th>书名</th>
            <th colspan="2">价格</th>

        </tr>
        <tr th:each="book:${shoppingCart}">
            <td th:text="${book.bookName}"></td>
            <td colspan="2" th:text="${book.bookPrice}" style="text-align: center"></td>
        </tr>

        <tr>
            <td>合计：</td>
            <td colspan="2" style="text-align: right"><input type="text" name="totalPrice" th:value="${totalPrice}">
            </td>
        </tr>
        <tr>
            <td colspan="3" style="text-align: center"><input type="submit" value="确认购买"></td>
        </tr>

    </table>
</form>

</body>
</html>